package io.kimmking.dubbo.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.kimmking.dubbo.common.entity.Customer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Kudu
 * @since 2021-08-03
 */
@Mapper
public interface CustomerMapper extends BaseMapper<Customer> {

    @Update("update customer set account=account+#{cost} where c_id=#{cId}")
    int updateAccountById(@Param("cost") Float cost, @Param("cId") Integer cId);

//    @Select("SELECT c_id,c_name,mon_kind,account,create_time,update_time FROM customer where c_name=#{cName}")
//    Customer selectOneCustomer(@Param("cName") Integer cName);

}
